#ifndef ADVERTISE_H
#define ADVERTISE_H

#include <QDialog>
#include <QMediaPlayer>

namespace Ui {
class Advertise;
}

class Advertise : public QDialog
{
    Q_OBJECT

public:
    explicit Advertise(QWidget *parent = nullptr);
    void init();
    ~Advertise();

private slots:
    void timeoutRun();

signals:
    void videoStop(bool flag1);

private:
    Ui::Advertise *ui;
    QTimer *timer;
    QMediaPlayer *player;
    void closeEvent(QCloseEvent *event);

protected:
    /**
     * @brief 用于倒计时延迟的函数
     * @param msec
     */
    void Delay_MSec(int msec);
};

#endif // ADVERTISE_H
